package dangs.dao;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import dangs.vo.OrderRecordVO;

public class OrderRecordDAO {
	private SqlMapClientTemplate client;
	public OrderRecordDAO(SqlMapClientTemplate client){
	this.client = client;
	}
	
	public void insertOrderRecord(OrderRecordVO orvo){
		client.insert("insertOrderRecord", orvo);
	}
	public OrderRecordVO selectOrderRecordByNo(int no){
		OrderRecordVO orvo = (OrderRecordVO) client.queryForObject("selectOrderRecordVO", no);
		return orvo;
	}
	public int selectMaxCode(){
		int maxCode = Integer.parseInt((String)client.queryForObject("selectMaxCode"));
		return maxCode;
	}
}
